---
title: os.readDir()
api: os.readDir
---

## Description

<Summary/>

In the returned array, directory names have a trailing slash `'/'` to distinguish from regular files.

## Syntax

``` js
os.readDir(pathname)
```

## Parameters

<Parameters/>

## See Also

* [os](/reference/api/os)
* [os.readFile](/reference/api/os/readFile)
